const { cpSync } = require("fs");
var Radio=require("./radio");

var radio=new Radio("music radio","FM 106.7");

radio.on("open",function(){
    console.log(radio.name,radio.rate+" opened")
    console.log("lalala...");
})
radio.on("close",function(){
    console.log(radio.name,radio.rate+" closed")
})
setTimeout(function(){
    radio.emit("open")
},1000)
setTimeout(function(){
    radio.emit("close")
},3000)